package com.genius.unite_platform.busswork.controller;

//import javax.servlet.http.HttpSession;
//import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;
import com.alibaba.fastjson.JSONObject;
//import com.genius.adminmanager.menu.entity.MenuJson;
import com.genius.adminmanager.other.entity.ResponseJson;
import com.genius.unite_platform.busswork.service.BussWorkService;
import com.genius.workflow.log.ControllerLog;

@Controller
public class BussWorkSelectController {
	@Autowired
    @Qualifier("BussWorkService")
    private BussWorkService BussWorkService;
	
	@GetMapping("/busswork/toSelect")
	    public String toIndex(){	    	
	        return "/views/unite_platform/busswork/select";
	    }
	    	    
     /**
     * 查询数据
     * @return
     * @throws Exception
     */
    @ControllerLog(description="查询分店列表")
    @PostMapping("/busswork/getSelectBody")
    @ResponseBody
    public JSONObject getSelectBody(@RequestBody JSONObject json){   
        JSONObject response = new JSONObject();
        response.put(ResponseJson.code, 0);        
        response = BussWorkService.getSelectBody(json, response);      
        return response;
    }
    /**
     * 查询数据
     * @return
     * @throws Exception
     */
    @ControllerLog(description="查询商品信息")
    @PostMapping("/busswork/getGoodsInfo")
    @ResponseBody
    public JSONObject getGoodsInfo(@RequestBody JSONObject json){ 
    	System.out.println("goodsinfofjjjjjjjjjjjjjjjjjjjjj");
        JSONObject response = new JSONObject();
        response.put(ResponseJson.code, 0);        
        response = BussWorkService.getGoodsInfo(json, response);      
        return response;
    }
    
    /**
    门店列表
     */
    @GetMapping("/mobile_page/busswork/shoplist")
    public String shouji_toSelect_shoplist(){
        return "/views/unite_platform/mobile_page/busswork/shoplist";
    }
    /**
    价签申请
     */
    @GetMapping("/mobile_page/busswork/pricetagapply")
    public String shouji_toSelect_pricetagapply(){
        return "/views/unite_platform/mobile_page/busswork/pricetagapply";
    }
    
}



